//
//  DownView.m
//  FoodCorner
//
//  Created by lanou3g on 16/2/27.
//  Copyright © 2016年 zhangchao. All rights reserved.
//

#import "DownView.h"
#import "DownChildOneView.h"
#import "DownChildTwoView.h"

@interface DownView ()
@property(nonatomic ,strong)DownChildOneView *downChildOneView;
@property(nonatomic ,strong)DownChildTwoView *downChildTwoView;
@end

@implementation DownView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
//        self.backgroundColor = [UIColor greenColor];
        [self andSubView];
    }
    return self;
}

- (void)andSubView{
    
    self.downChildOneView = [[DownChildOneView alloc]initWithFrame:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height*0.2)];
    self.downChildOneView.backgroundColor = [UIColor lightGrayColor];
    
    self.downChildTwoView = [[DownChildTwoView alloc]initWithFrame:CGRectMake(0, self.frame.size.height*0.2, self.frame.size.width, self.frame.size.height*0.8)];
    
//    self.downChildTwoView.backgroundColor = [UIColor cyanColor];
    
    [self addSubview:_downChildOneView];
    [self addSubview:_downChildTwoView];
}
@end
